1. Field of the Invention
The present invention relates generally to a distribution system of digital contents, i.e., digitally encoded published materials. More particularly, the invention relates to a method and a system for on-line controlling caching of an image on a viewing device to efficiently display the image on the viewing device.
2. Description of Related Art
Advances in computer and communication technology have provided to the consumers a convenient and economical means to access information in a variety of media. One particular area of information access is the electronic books. An electronic book is a viewing device that receives printed materials in the form of digital data downloaded from an information network. A user of an electronic book can read downloaded contents of books and printed materials subscribed from a participating bookstore at his or her own convenience without the need to purchase the printed copies of the books.
The World Wide Web (WWW) has now become a popular means for publishing printed materials in the open network domain. The WWW refers to the abstract cyberspace of information which is transmitted over the physical networks, such as the Internet. The WWW publishing works under a client-server model. A Web server is a program running on a server to serve documents to other computers or devices that send requests for the documents. A Web client is a program that lets the user request documents from a server. To facilitate the downloading of printed materials, the contents of these documents are typically created in a form compatible with the network transmission format. The documents sent by a server are in a hypertext language format. A popular hypertext language is the HyperText Markup Language (HTML), which is a fairly limited formatting language.
When an image is to be sent to a viewing device, the server sends the following HTML image tag:
 less than IMG SRC=xe2x80x9c less than location greater than xe2x80x9d [HEIGHT= less than n greater than ] [WIDTH= less than n greater than ] greater than 
The image tag attribute SRC has the value  less than location greater than  which specifies the location of the image at the server. The attributes HEIGHT and WIDTH which provide the image height and width information are optional.
After parsing the image tag and its attributes, the viewing device performs the following actions to obtain and display the image:
a. The viewing device opens a network connection to the location specified by the SRC attribute value.
b. The viewing device starts downloading the image.
c. Using the xe2x80x9cmodification date/timexe2x80x9d from the supplied image file, the viewing device determines whether a locally cached copy of the image is current.
d. If there is no locally cached copy of the image, or if the locally cached version is not current, the viewer continues the image transfer and the image will be displayed (and optionally added to the local cache memory).
e. If there is a locally cached copy of the image and the modification date indicates that the cached copy is current, the viewer will then abort the image transfer and use the locally cached copy.
In the above standard procedure, the opening of the network connection and the start of the image downloading are unnecessary when a current copy of the image is already locally cached. These two potentially unnecessary actions significantly degrade the image display performance, especially on slow network connection links, such as the point-to-point protocol (PPP) link.
Therefore, currently, there is a need for a simple and efficient method to perform on-line image caching control for efficient image display using a hypertext language.
The present invention is a method for on-line controlling caching of an image on a viewing device to efficiently display the image on the viewing device. The method comprises the following steps: (a) sending from a server to the viewing device an image tag included in a hypertext language code, the image tag having attributes, the attributes specifying the image; (b) parsing the hypertext language code including the image tag; (c) searching for a copy of the image in a cache memory of the viewing device using the image tag attributes; (d) displaying the copy of the image if the copy of the image is found in the cache memory and is current; (e) fetching the image from the server if the copy of the image is not found in the cache memory or if the copy of the image is not current; and (f) storing the fetched image and the image tag attributes in the cache memory.